package com.courseSchedulingSystem.mapper;

import com.courseSchedulingSystem.pojo.entity.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommonMapper {


    @Select("select * from students")
    List<Student> selectAllStudents();

    @Select("select * from students where stuId = #{stuId}")
    Student selectStudentByStuId(@Param("stuId") int stuId);


    @Select("SELECT * FROM course WHERE courseId = #{courseId}")
    Course getCourse(@Param("courseId") String courseId);
}
